from gui import gui

class application_window_fake :
    def __init__ ( self ) :
        self . _focused = None
    def focus ( self ) :
        self . _focused = True

class tkinter_fake :
    def __init__ ( self ) :
        self . _application_windows = [ ]
    def Tk ( self ) :
        window = application_window_fake ( )
        self . _application_windows += [ window ]
        return window

class mediator_fake :
    def __init__ ( self ) :
        self . _gui_create_application_window_reply = None
    def gui_create_application_window_reply ( self , window ) :
        self . _gui_create_application_window_reply = window 

class gui_move_focus_to_tests :
    'gui_move_focus_to'
    def __init__ ( self , test ) :
        self . _test = test
        self . _tkinter = tkinter_fake ( )
        self . _mediator = mediator_fake ( )
        self . _gui = gui ( mediator = self . _mediator , tkinter = self . _tkinter , tkfont = None , scheduler = None )
    def test_move_focus_to ( self ) :
        self . _gui . gui_create_application_window_request ( )
        window = self . _mediator . _gui_create_application_window_reply
        self . _gui . gui_move_focus_to ( window )
        self . _test . assume_true ( self . _tkinter . _application_windows [ 0 ] . _focused )
